﻿<%@ Page Title="" Culture="En-GB" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="AssessorCalendar.aspx.cs" Inherits="Assessor_AssessorCalendar" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        /*Calendar Control CSS*/
        .cal_Theme1 .ajax__calendar_container   {
        background-color: #ffffff ; /*#DEF1F4;*/
        border:solid 1px #77D5F7;
        width:20em;  
        position   : absolute;   
        }        

        .cal_Theme1 .ajax__calendar_header  {
        /*background-color: #ffffff;*/
        margin-bottom: 4px;
        }
        .cal_Theme1 .ajax__calendar_title,
        .cal_Theme1 .ajax__calendar_next,
        .cal_Theme1 .ajax__calendar_prev    {
        color: #004080;
        padding-top: 3px;
        }

        .cal_Theme1 .ajax__calendar_body    {
        /*background-color: #ffffff;*/
        border: solid 1px #77D5F7;
        width:18em;
        height:15em;
        }

        .cal_Theme1 .ajax__calendar_dayname {
        text-align:center;
        font-weight:bold;
        margin-bottom: 4px;
        margin-top: 2px;
        color: #004080;
        }

        .cal_Theme1 .ajax__calendar_day {
        color: #004080;
        text-align:center;
        }
        .cal_Theme1 .ajax__calendar_hover .ajax__calendar_day,
        .cal_Theme1 .ajax__calendar_hover .ajax__calendar_month,
        .cal_Theme1 .ajax__calendar_hover .ajax__calendar_year,
        .cal_Theme1 .ajax__calendar_active  {
        color: #004080;
        font-weight: bold;
        /*background-color: #DEF1F4;*/
        }

        .cal_Theme1 .ajax__calendar_today   {
        font-weight:bold;
        }

        .cal_Theme1 .ajax__calendar_other,
        .cal_Theme1 .ajax__calendar_hover .ajax__calendar_today,
        .cal_Theme1 .ajax__calendar_hover .ajax__calendar_title {
        color: #bbbbbb;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="..\CSS\CSS.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/font-awesome.css" rel="stylesheet" />
    <script src="../Js/Forms/jsAssessorCalendar.js"></script>
    <style type="text/css">
        .shadow {
            box-shadow: inset 0 0 25px #000000;
            border-radius: 6px;
        }

        .auto-style4 {
            width: 25%;
        }

        #ContentPlaceHolder1_gvAssessorCalendar tbody tr td {
            color: inherit !important;
        }

            #ContentPlaceHolder1_gvAssessorCalendar tbody tr td table tbody tr td {
                color: inherit !important;
            }
    </style>

    <script src="..\Js\Extension.min.js" type="text/javascript"></script>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <script type="text/javascript" lang="javascript">
        function calendarShown(sender, args) {
            sender._popupBehavior._element.style.zIndex = 10005;
        }


        function CompareStartAndEndDate(sender, args) {

            var txtFromExpiryDate = document.getElementById('<%=txtStartDate.ClientID %>');//dd/mm/yyyy format
            var txtToExpiryDate = document.getElementById('<%=txtEndDate.ClientID %>');//dd/mm/yyyy format

            var SD = txtFromExpiryDate.value.split('/');
            var ED = txtToExpiryDate.value.split('/');

            var startDate = Date.parse(SD[1] + "/" + SD[0] + "/" + SD[2]);
            var endDate = Date.parse(ED[1] + "/" + ED[0] + "/" + ED[2]);
            var MIN = '<%=ConfigurationManager.AppSettings["AssessorCalendarMin"].ToString() %>'
            var MAX = '<%=ConfigurationManager.AppSettings["AssessorCalendarMax"].ToString() %>'
            // Make sure they are valid
            if (isNaN(startDate)) {
                if (txtFromExpiryDate.value != '')
                    alert("Start date is not valid.");
                args.IsValid = false;
            }
            if (isNaN(endDate)) {
                if (txtToExpiryDate.value != '')
                    alert("End date is not valid.");
                args.IsValid = false;
            }
            var difference = (endDate - startDate) / (86400000 * parseInt(MAX));
            if (difference < 0) {
                alert("The start date must come before the end date.");
                args.IsValid = false;
            }
            if (difference >= 1) {
                alert("Assessor availability time slot should be maximum " + MAX + " days.");
                args.IsValid = false;
            }
            var min_difference = (endDate - startDate) / (86400000 * parseInt(MIN));

            if (parseFloat(min_difference) < 1) {
                alert("Assessor availability time slot should be minimum " + MIN + " days.");
                args.IsValid = false;
            }
            return true;
        }

        function validateCheckBoxes(sender, args) {
            var date;
            args.IsValid = true;
            var gridView = document.getElementById('<%= gvAssessorCalendar.ClientID %>');
            for (var i = 1; i < gridView.rows.length; i++) {
                var inputs = gridView.rows[i].getElementsByTagName('input');
                if (inputs != null) {
                    if (inputs[0].type == 'checkbox' && inputs[1].type == 'checkbox') {
                        if (inputs[0].checked == true || inputs[1].checked == true) {
                            if (args.IsValid)
                                args.IsValid = true;
                        }
                        else {
                            args.IsValid = false;

                            if (gridView.rows[i].cells[0].innerText == 'Delete') {
                                date = gridView.rows[i].cells[0].innerHTML;
                            }
                            else {
                                date = gridView.rows[i].cells[1].innerHTML;
                            }
                            alert("Please select atleast one available session from first or second half for date =" + date);
                            return false;
                        }
                    }
                }
            }
            if (args.IsValid) {
                return true;
            }
        }

    </script>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="margin-left: 60px; width: 100%;">

                <tr>
                    <td colspan="6" style="text-align: left;">
                        <h2>Assessor Calendar</h2>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="text-align: left;">
                        <table style="width: 100%;" class="shadow">
                            <tr>
                                <td>
                                    <table style="width: 80%; margin-top: 30px; margin-bottom: 0px; margin-left: 10%; margin-right: 10%;">
                                        <tr>
                                            <td>
                                                <h3>Date Already Blocked</h3>
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width: 80%; margin-top: 0px; margin-bottom: 50px; margin-left: 10%; margin-right: 10%;">

                                        <tr>
                                            <td colspan="6" style="text-align: left;">
                                                <h4>Assessor's available Calendar slots -
                            <asp:Label runat="server" ID="lblTotalDays" Text=""></asp:Label>
                                                    Days</h4>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: left; width: 10%; vertical-align: top; padding-top: 8px;">From Date</td>
                                            <td style="width: 1%; vertical-align: top; padding-top: 8px;">&nbsp;&nbsp;:&nbsp;&nbsp;</td>

                                            <td style="width: 24%; vertical-align: top;">
                                                <asp:TextBox ID="txtSearchFDate" runat="server" MaxLength="12" placeholder="Start Date"
                                                    ViewStateMode="Enabled" Width="100px" cultureinvariantvalues="true"></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender3" runat="server" Format="dd/MM/yyyy" PopupButtonID="popcalenderSFD" OnClientShown="calendarShown"  CssClass="cal_Theme1" FirstDayOfWeek="Monday"
                                                    TargetControlID="txtSearchFDate" />
                                                <i class="icon-th" id="popcalenderSFD"></i>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="SEARCH" ControlToValidate="txtSearchFDate" Display="Dynamic"
                                                    ErrorMessage="Select" ForeColor="Red"></asp:RequiredFieldValidator>
                                            </td>

                                            <td style="text-align: right; width: 10%; vertical-align: top; padding-top: 8px;">To Date</td>
                                            <td style="width: 1%; vertical-align: top; padding-top: 8px;">&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                            <td style="width: 54%; vertical-align: top;">
                                                <asp:TextBox ID="txtSearchTDate" runat="server" MaxLength="12" placeholder="End Date" ViewStateMode="Enabled"
                                                    Width="100px" cultureinvariantvalues="true"></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender4" runat="server" Format="dd/MM/yyyy" PopupButtonID="popcalenderSED" OnClientShown="calendarShown" TargetControlID="txtSearchTDate"  CssClass="cal_Theme1" FirstDayOfWeek="Monday" />
                                                <i class="icon-th" id="popcalenderSED"></i>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationGroup="SEARCH" runat="server" ControlToValidate="txtSearchTDate" Display="Dynamic"
                                                    ErrorMessage="Select" ForeColor="Red"></asp:RequiredFieldValidator>
                                                &nbsp;
                        
                        <asp:Button runat="server" ID="btnSearch" Text="Search" ValidationGroup="SEARCH" OnClick="btnSearch_Click" />
                                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtSearchTDate" ControlToCompare="txtSearchFDate"
                                                    Operator="GreaterThan" Type="Date" ForeColor="Red" ValidationGroup="SEARCH" ErrorMessage="From date should be less than To Date">
                                                </asp:CompareValidator>

                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6" style="text-align: left;">&nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6">
                                                <div id="Div1" class="grd_table" style="max-height: 150px; overflow-y: scroll;" runat="server">
                                                    <asp:GridView ID="gvAssessorAvailableCalendarList" runat="server" Width="100%" AutoGenerateColumns="false"
                                                        AllowPaging="false" DataKeyNames="AssessorCalendarID" OnRowCommand="gvAssessorAvailableCalendarList_RowCommand">
                                                        <Columns>
                                                            <asp:BoundField DataField="GDStartDate" HeaderText="&nbsp;Start Date">
                                                                <ItemStyle Width="15%" HorizontalAlign="Left" />
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="GDEndDate" HeaderText="&nbsp;End Date">
                                                                <ItemStyle Width="15%" HorizontalAlign="Left" />
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="GDRemark" HeaderText="&nbsp;Remarks">
                                                                <ItemStyle Width="60%" HorizontalAlign="Left" />
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField HeaderText="" ShowHeader="false">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnEdit" runat="server" CommandName="EDITDATE" Text="Edit"
                                                                        CommandArgument='<%# Eval("AssessorCalendarID") %>'></asp:LinkButton>
                                                                    <itemstyle width="10%" horizontalalign="Left" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                        </Columns>
                                                        <EmptyDataRowStyle HorizontalAlign="Center" BorderStyle="None" BorderWidth="0" />
                                                        <EmptyDataTemplate>
                                                            Availability Time Slot not found.
                                                        </EmptyDataTemplate>
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>

                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="text-align: left;">
                        <table style="width: 100%;" class="shadow">
                            <tr>
                                <td>
                                    <table style="width: 90%; margin-top: 30px; margin-bottom: 0px; margin-left: 5%; margin-right: 5%;">
                                        <tr>
                                            <td id="tdHeaderMessage" runat="server">
                                                <h3>Block New Dates Here</h3>
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width: 90%; margin-top: 0px; margin-bottom: 50px; margin-left: 5%; margin-right: 5%;">
                                        <tr>
                                            <td style="text-align: left; vertical-align: top; width: 10%; padding-top: 8px;">Start Date</td>
                                            <td style="width: 1%; vertical-align: top; padding-top: 8px;">&nbsp;&nbsp;:&nbsp;&nbsp;</td>

                                            <td style="width: 24%; vertical-align: top;">
                                                <asp:TextBox ID="txtStartDate" runat="server" MaxLength="12" placeholder="Start Date" CssClass="disable_past_dates"
                                                    ViewStateMode="Enabled" Width="100px" cultureinvariantvalues="true"></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MM/yyyy" PopupButtonID="popcalender1" OnClientShown="calendarShown"  CssClass="cal_Theme1" FirstDayOfWeek="Monday"
                                                    TargetControlID="txtStartDate" />
                                                <i class="icon-th" id="popcalender1"></i>
                                                <asp:RequiredFieldValidator ID="reqStartDate" ValidationGroup="ADDGDDETAILS" runat="server" ControlToValidate="txtStartDate" Display="Dynamic" ErrorMessage="Select" ForeColor="Red"></asp:RequiredFieldValidator>
                                            </td>

                                            <td style="text-align: right; width: 10%; vertical-align: top; padding-top: 8px;">End Date</td>
                                            <td style="width: 1%; vertical-align: top; padding-top: 8px;">&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                            <td style="width: 54%; vertical-align: top;">
                                                <asp:TextBox ID="txtEndDate" runat="server" MaxLength="12" placeholder="End Date" ViewStateMode="Enabled" CssClass="disable_past_dates"
                                                    Width="100px" cultureinvariantvalues="true"></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender2" runat="server" Format="dd/MM/yyyy" PopupButtonID="popcalender2" OnClientShown="calendarShown" TargetControlID="txtEndDate"  CssClass="cal_Theme1" FirstDayOfWeek="Monday"/>
                                                <i class="icon-th" id="popcalender2"></i>

                                                <asp:RequiredFieldValidator ID="reqEndDate" runat="server" ValidationGroup="ADDGDDETAILS" ControlToValidate="txtEndDate" Display="Dynamic" ErrorMessage="Select" ForeColor="Red"></asp:RequiredFieldValidator>
                                                <br />
                                                <asp:Label runat="server" ID="lblDtRnge" Text="" ForeColor="Red"></asp:Label>
                                                <asp:CompareValidator ID="cmprDates" runat="server" ControlToValidate="txtEndDate" ControlToCompare="txtStartDate"
                                                    Operator="GreaterThanEqual" Type="Date" ForeColor="Red" ValidationGroup="ADDGDDETAILS" ErrorMessage="Start date should be less than End Date">
                                                </asp:CompareValidator>
                                                <asp:CustomValidator ID="valCustmCheckDate" runat="server" ErrorMessage=""
                                                    ForeColor="Red" Display="Dynamic" ValidationGroup="ADDGDDETAILS" ClientValidationFunction="CompareStartAndEndDate"></asp:CustomValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: left; width: 12%;">Remarks</td>
                                            <td style="width: 1%;">&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                            <td colspan="4" style="width: 89%;">
                                                <asp:TextBox runat="server" ID="txtRemark" TextMode="MultiLine" Height="50px" Width="650px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td></td>
                                            <td colspan="4">
                                                <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" ValidationGroup="ADDGDDETAILS" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6">
                                                <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage=""
                                                    ForeColor="Red" Display="Dynamic" ValidationGroup="SAVE" ClientValidationFunction="validateCheckBoxes" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                                                <asp:Label runat="server" ID="lblCheckError" Text="  " ForeColor="Red"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="hidCheckSessMsg">
                                            <td colspan="6" style="font-size: 20px; text-align: center;">
                                                <b>Check Sessions where you are available</b>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6">
                                                <div id="Div2" class="grd_table" style="max-height: 350px; overflow-y: scroll;" runat="server">
                                                    <asp:GridView ID="gvAssessorCalendar" runat="server" Width="100%" AutoGenerateColumns="false"
                                                        OnRowDataBound="gvAssessorCalendar_RowDataBound" DataKeyNames="AssessorCalendarDetailID" OnRowDeleting="gvAssessorCalendar_RowDeleting">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Action">
                                                                <ItemStyle Width="9%" HorizontalAlign="Center" />
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="lnkDelete" CommandArgument='<%# Eval("AssessorCalendarDetailID") %>' CommandName="Delete" runat="server">
                                                                        <%# Convert.ToInt32(Eval("IsActive")) == 0 ? "Activate" : "<i class=\"fa fa-trash fa-lg\" aria-hidden=\"true\"></i>"%></asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="StartDate" HeaderText="&nbsp;Start Date">
                                                                <ItemStyle HorizontalAlign="Left" Width="18%" />
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField>
                                                                <HeaderTemplate>
                                                                    &nbsp;<asp:CheckBox ID="checkAllFirstHalf" runat="server" Text="&nbsp;&nbsp;First half(AM)" TextAlign="Right" onclick="checkAll(this,'H','first');" />
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <table>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:CheckBox type="checkbox" runat="server" ID="chkApproveFirstHalf" EnableViewState="true" onclick="checkAll(this,'I','first');" /></td>
                                                                            <td>
                                                                                <asp:DropDownList runat="server" ID="ddlFHHour" Width="55px" ClientIDMode="AutoID" ForeColor="Black">
                                                                                    <asp:ListItem Text="01" Value="1"></asp:ListItem>
                                                                                    <asp:ListItem Text="02" Value="2"></asp:ListItem>
                                                                                    <asp:ListItem Text="03" Value="3"></asp:ListItem>
                                                                                    <asp:ListItem Text="04" Value="4"></asp:ListItem>
                                                                                    <asp:ListItem Text="05" Value="5"></asp:ListItem>
                                                                                    <asp:ListItem Text="06" Value="6"></asp:ListItem>
                                                                                    <asp:ListItem Text="07" Value="7"></asp:ListItem>
                                                                                    <asp:ListItem Text="08" Value="8"></asp:ListItem>
                                                                                    <asp:ListItem Text="09" Value="9"></asp:ListItem>
                                                                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                                    <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                                                                    <asp:ListItem Text="12" Value="0"></asp:ListItem>
                                                                                </asp:DropDownList>Hr. &nbsp;
                                                                                <asp:DropDownList runat="server" ID="ddlFHMinute" Width="55px" ClientIDMode="AutoID" ForeColor="Black">
                                                                                    <asp:ListItem Text="00" Value="0"></asp:ListItem>
                                                                                    <asp:ListItem Text="05" Value="5"></asp:ListItem>
                                                                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                                    <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                                                    <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                                                    <asp:ListItem Text="25" Value="25"></asp:ListItem>
                                                                                    <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                                                                    <asp:ListItem Text="35" Value="35"></asp:ListItem>
                                                                                    <asp:ListItem Text="40" Value="40"></asp:ListItem>
                                                                                    <asp:ListItem Text="45" Value="45"></asp:ListItem>
                                                                                    <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                                                    <asp:ListItem Text="55" Value="55"></asp:ListItem>
                                                                                </asp:DropDownList>Mins. &nbsp; AM
                                                                                <br />
                                                                                <asp:HyperLink runat="server" ID="FirstHalfCandidateName" NavigateUrl='<%# GetViewtUrl(Eval("CandidateID"))%>' Text='<%# Eval("CandidateName") %>'></asp:HyperLink>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="30%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField>
                                                                <HeaderTemplate>
                                                                    &nbsp;<asp:CheckBox ID="checkAllSecondHalf" runat="server" Text="&nbsp;&nbsp;Second half(PM)" TextAlign="Right" onclick="checkAll(this,'H','second');" />
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <table>
                                                                        <td>
                                                                            <asp:CheckBox type="checkbox" runat="server" ID="chkApproveSecondHalf" EnableViewState="true" onclick="checkAll(this,'I','second');" /></td>
                                                                        <td>
                                                                            <asp:DropDownList runat="server" ID="ddlSHHour" Width="55px" ClientIDMode="Inherit" ForeColor="Black">
                                                                                <asp:ListItem Text="01" Value="1"></asp:ListItem>
                                                                                <asp:ListItem Text="02" Value="2"></asp:ListItem>
                                                                                <asp:ListItem Text="03" Value="3"></asp:ListItem>
                                                                                <asp:ListItem Text="04" Value="4"></asp:ListItem>
                                                                                <asp:ListItem Text="05" Value="5"></asp:ListItem>
                                                                                <asp:ListItem Text="06" Value="6"></asp:ListItem>
                                                                                <asp:ListItem Text="07" Value="7"></asp:ListItem>
                                                                                <asp:ListItem Text="08" Value="8"></asp:ListItem>
                                                                                <asp:ListItem Text="09" Value="9"></asp:ListItem>
                                                                                <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                                <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                                                                <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                                                            </asp:DropDownList>Hr. &nbsp;
                                                                            <asp:DropDownList runat="server" ID="ddlSHMinute" Width="55px" ClientIDMode="AutoID" ForeColor="Black">
                                                                                <asp:ListItem Text="00" Value="0"></asp:ListItem>
                                                                                <asp:ListItem Text="05" Value="5"></asp:ListItem>
                                                                                <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                                <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                                                <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                                                <asp:ListItem Text="25" Value="25"></asp:ListItem>
                                                                                <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                                                                <asp:ListItem Text="35" Value="35"></asp:ListItem>
                                                                                <asp:ListItem Text="40" Value="40"></asp:ListItem>
                                                                                <asp:ListItem Text="45" Value="45"></asp:ListItem>
                                                                                <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                                                <asp:ListItem Text="55" Value="55"></asp:ListItem>
                                                                            </asp:DropDownList>Mins. &nbsp; PM<br />
                                                                            <asp:HyperLink runat="server" ID="SecondHalfCandidateName" NavigateUrl='<%# GetViewtUrl(Eval("CandidateID"))%>' Text='<%# Eval("CandidateName") %>'></asp:HyperLink>
                                                                        </td>
                                                                    </table>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="30%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField>
                                                                <HeaderTemplate>Location - City</HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:TextBox runat="server" ID="txtEveryDayRemark" MaxLength="240" Text='<%# Eval("Remark") %>'></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField InsertVisible="true" Visible="false">
                                                                <HeaderTemplate>AssessorCalendarDetailID</HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblAssessorCalendarDetailID" MaxLength="240" Text='<%# Eval("AssessorCalendarDetailID") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField InsertVisible="true" Visible="false">
                                                                <HeaderTemplate>ActiveStatus</HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblActiveStatus" MaxLength="240" Text='<%# Eval("ActiveStatus") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField InsertVisible="true" Visible="false">
                                                                <HeaderTemplate>ActiveStatus</HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCanFirstHalfCheck" Text='<%# Eval("CanFirstHalfCheck") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField InsertVisible="true" Visible="false">
                                                                <HeaderTemplate>ActiveStatus</HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label runat="server" ID="lblCanSecondHalfCheck" Text='<%# Eval("CanSecondHalfCheck") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                                        <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                                                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                                        <EditRowStyle BackColor="#CCCCCC" />
                                                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                    </asp:GridView>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6">&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                        </tr>
                                        <tr runat="server" id="vButton">
                                            <td colspan="6" align="center">
                                                <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="SAVE" OnClick="btnSave_Click" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>

                    </td>
                </tr>

            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

